import {request} from '@/utils/request'
import type { ListResponse } from "@/utils/typeRes";

// 登录接口
export const login = (data: { username: string; password: string }) =>
  request<{ token: string }>({
    url: '/login',
    method: 'POST',
    data,
  });

// 获取用户信息接口
export const getUserInfo = () =>
  request<{ id: number; name: string }>({
    url: '/user/info',
    method: 'GET',
  });
  
  // 应用列表
  export const getList = () =>
    request<ListResponse>({
      url: '/app/list',
      method: 'GET',
    });
  

